#!/usr/bin/python

import sys

def isPerson(stringOfCats):
    if(stringOfCats.find("_birth")!=-1):
        return True
    return False

for eachLine in sys.stdin:
    eachLine = eachLine.strip()
    art_name = eachLine.split("\t")[0]
    categories = eachLine.split("\t")[1]
    if(isPerson(categories) == True):
        print art_name+"\t"+"\t".join(categories.split("|"))
